/*
 * Copyright (c) 2007-2021 西安交通信息投资营运有限公司 版权所有
 */

package com.xci.xajtfb.om.dao;

import com.github.lvyanyang.annotation.Paging;
import com.xci.xajtfb.om.entity.BasicCustomer;
import com.xci.xajtfb.om.filter.BasicCustomerFilter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 客户档案数据层
 * @author 吕艳阳 lvyanyang@xci96716.com
 * @since 2021-02-04 19:05:25
 */
public interface BasicCustomerDao {
    /**
     * 根据主键查询单个客户档案
     * @param id 客户档案主键
     * @return 返回客户档案实体
     */
    BasicCustomer selectById(@Param("id") Long id);

    /**
     * 查询客户档案分页列表
     * @param filter 过滤条件
     * @return 返回客户档案分页列表
     */
    /*
        allowSortNames = {"name","short_name","nature","category","link_man","link_phone","tax_number","tax_address","tax_tel","tax_bank","tax_bank_account","operate_user_name","operate_date_time","spell","full_spell","stock_owe_the_amount","invoice_owe_the_amount","business","car_number","contract_number","invoicing_category","customer_manager","maintain_self","maintain_self_start_time","maintain_name","maintain_link_man","maintain_link_phone","snapshot_id","project_id","project_name","file_count","status","remark"},
        sortNameMaps = {"name:name","short_name:short_name","nature:nature","category:category","link_man:link_man","link_phone:link_phone","tax_number:tax_number","tax_address:tax_address","tax_tel:tax_tel","tax_bank:tax_bank","tax_bank_account:tax_bank_account","operate_user_name:operate_user_name","operate_date_time:operate_date_time","spell:spell","full_spell:full_spell","stock_owe_the_amount:stock_owe_the_amount","invoice_owe_the_amount:invoice_owe_the_amount","business:business","car_number:car_number","contract_number:contract_number","invoicing_category:invoicing_category","customer_manager:customer_manager","maintain_self:maintain_self","maintain_self_start_time:maintain_self_start_time","maintain_name:maintain_name","maintain_link_man:maintain_link_man","maintain_link_phone:maintain_link_phone","snapshot_id:snapshot_id","project_id:project_id","project_name:project_name","file_count:file_count","status:status","remark:remark"}
    */
    @Paging
    List<BasicCustomer> selectPageList(@Param("filter") BasicCustomerFilter filter);
}